<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义JS框架</title>
    //使用script标签去引入
    <script src="js/itcast.js"></script>
</head>
<body>
<div id="div1">div1****</div>
<div id="div2">div2****</div>

<script>
    //1.获取元素对象
   // var div1 = document.getElementById("div1");
    //var div2 = document.getElementById("div2");
    var div1 =$("div1")
    var div2 =$("div2")
    //2.获取标签体内容
    alert(div1.innerHTML)
    alert(div2.innerHTML)


    //3.封装方法，根据id来获取元素对象
    // function get(id) {
    //     var obj = document.getElementById(id);
    //     return obj;
    // }

</script>
</body>
</html>